;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; HW7 blocks world + painting (stub)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define (domain hw6)
  (:requirements :strips)

  (:constants 
	Red
	)
	
  (:predicates 
	(on-table ?x)
	(arm-empty)
	(holding ?x)
	(color ?x ?r)
  )	 
  
(:action spray-paint
	     :parameters (?sprayer ?blockA)
	     :precondition ( and (holding ?sprayer)
						(on-table ?blockA)
						(not (color ?blockA  Red)))
	     :effect
	     (and (color ?blockA  Red)))
		   
(:action pickup
	     :parameters (?sprayer)
	     :precondition (and (on-table ?sprayer)
						(arm-empty))
	     :effect
	     (and (holding ?sprayer)
		   (not(arm-empty))
		   (not(on-table ?sprayer))))
		   
(:action put-down
	     :parameters (?sprayer )
	     :precondition (and (holding ?sprayer) (not(arm-empty)))
	     :effect
	     (and (not (holding ?sprayer))
		   (arm-empty)
		   (on-table ?sprayer))))


